﻿<?php 
session_start();
if ($_session['user_guid'] == "" || $_session['user_guid'] == null)
{
//	header("Location:login.php");
}
$ip = $_SERVER["REMOTE_ADDR"];
$host = $_SERVER["HTTP_HOST"];
$Agent = $_SERVER['HTTP_USER_AGENT'];;
$language = "";
$verson = "";

function getOS($strAgent){
$os = false;
if(eregi('win',$strAgent) && strpos($strAgent,'95')){
$os = 'Windows 95';
}
else if(eregi('win 9x',$strAgent) && strpos($strAgent,'4.90')){
$os = 'Windows ME';
}
else if(eregi('win',$strAgent) && eregi('98',$strAgent)){
$os = 'Windows 98';
}
else if(eregi('win',$strAgent) && eregi('nt 6.0',$strAgent)){
$os = 'Windows Vista';
}
else if(eregi('win',$strAgent) && eregi('nt 5.2',$strAgent)){
$os = 'Windows 2003 Server';
}
else if(eregi('win',$strAgent) && eregi('nt 5.1',$strAgent)){
$os = 'Windows XP';
}
else if(eregi('win',$strAgent) && eregi('nt 5',$strAgent)){
$os = 'Windows 2000';
}
else if(eregi('win',$strAgent) && eregi('nt',$strAgent)){
$os = 'Windows NT';
}
else if(eregi('win',$strAgent) && eregi('32',$strAgent)){
$os = 'Windows 32';
}
else if(eregi('linux',$strAgent)){
$os = 'Linux';
}
else if(eregi('unix',$strAgent)){
$os = 'Unix';
}
else if(eregi('sun',$strAgent) && eregi('os',$strAgent)){
$os = 'SunOS';
}
else if(eregi('ibm',$strAgent) && eregi('os',$strAgent)){
$os = 'IBM OS/2';
}
else if(eregi('mac',$strAgent) && eregi('pc',$strAgent)){
$os = 'Macintosh';
}
else if(eregi('powerpc',$strAgent)){
$os = 'PowerPC';
}
else if(eregi('aix',$strAgent)){
$os = 'AIX';
}
else if(eregi('HPUX',$strAgent)){
$os = 'HPUX';
}
else if(eregi('netbsd',$strAgent)){
$os = 'NetBSD';
}
else if(eregi('bsd',$strAgent)){
$os = 'BSD';
}
else if(eregi('OSF1',$strAgent)){
$os = 'OSF1';
}
else if(eregi('IRIX',$strAgent)){
$os = 'IRIX';
}
else if(eregi('FreeBSD',$strAgent)){
$os = 'FreeBSD';
}
else if(eregi('teleport',$strAgent)){
$os = 'teleport';
}
else if(eregi('flashget',$strAgent)){
$os = 'flashget';
}
else if(eregi('webzip',$strAgent)){
$os = 'webzip';
}
else if(eregi('offline',$strAgent)){
$os = 'offline';
}
else{
$os = 'Unknown OS';
}
return $os;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>后台首页</title>
    <link href="../Files/Css/products.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../Files/Javascript/jquery.js"></script>

    <script type="text/javascript">
        jQuery(function($) {
            $(".content .main .record:last").addClass("nobor");
        });
    </script>

</head>
<body>
    <div id="divWelcomeHead" class="wel_Topbar">
        <div class="wel_user">
            <h3>

                <script type="text/javascript"> 
            now = new Date(),hour = now.getHours() 
            if(hour < 6){document.write("凌晨好!")} 
            else if (hour < 9){document.write("早上好!")} 
            else if (hour < 12){document.write("上午好!")} 
            else if (hour < 14){document.write("中午好!")} 
            else if (hour < 17){document.write("下午好!")} 
            else if (hour < 19){document.write("傍晚好!")} 
            else if (hour < 22){document.write("晚上好!")} 
            else {document.write("夜深了!")} 
                </script>

            </h3>
        </div>
        <div class="wel_Tr">
        </div>
    </div>
    <div class="container">
        <div class="content">
            <div class="head">
                <div class="title">
                    <ul>
                        <li>服务器参数</li>
                    </ul>
                </div>
                <div id="clear">
                </div>
            </div>
            <div class="main">
                <table width="100%">
                    <tr>
                        <td style="width:30%;">
                            <b>IP地址：</b>
                        </td>
                        <td align="left">
                            <?php echo $ip ?>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <b>域名：</b>
                        </td>
                        <td align="left">
                            <?php echo $host ?>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <b>操作系统：</b>
                        </td>
                        <td align="left">
                            <?php echo getOS($Agent) ?>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <b>系统语言：</b>
                        </td>
                        <td align="left">
                            <?php echo $language ?>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <b>php版本: </b>
                        </td>
                        <td align="left">
                            <?php echo $verson ?>
                        </td>
                    </tr>
                </table>
                <div id="clear">
                </div>
            </div>
        </div>
        <div id="clear">
        </div>
    </div>
</body>
</html>
